home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
uucp
/
wuucp_0_0_29.lha
/
update-execute.me
< prev
next >
Wrap
AmigaDOS Script File
|
1994-06-14
|
6KB
|
192 lines
.key none
.bra {
.ket }
echo "Please READ this script first and remote the 'quit 20'"
echo "command before execution! Don't say I haven't warned you ..."
quit 20 ; remove this command AFTER CAREFULLY checking the contents of this script!
; YOU HAVE BEEN WARNED. I DO NOT GUARANTEE THAT THIS SKRIPT WORKS AS
; EXPECTED (also it seems to do so =:->).
failat 1
set tmpversionid `type version.id`
; first cd into another dir to make sure we find the CORRECT
; places of the commands we're looking for ... In order to
; deal with resident commands, remove all, just in case.
echo "Removing possibly RESIDENT loaded programs; just ignore the error messages."
failat 10
resident remove nikecico2
resident remove uucico
resident remove uucp
resident remove uux
resident remove uuxqt
resident remove getty
resident remove sendmail
resident remove rmail
set tmpuuciconame `which uucico`
set tmpuucpname `which uucp`
set tmpuuxname `which uux`
set tmpuuxqtname `which uuxqt`
set tmpgettyname `which getty`
set tmpsendmailname `which sendmail`
set tmprmailname `which rmail`
set tmpnikecico2name `which nikecico2`
; now check wheter we did find all programs; abort on first problem,
; let the user fix it.
get tmpuuciconame
if $RC not eq 0 val
skip goterror
endif
get tmpuucpname
if $RC not eq 0 val
skip goterror
endif
get tmpuuxname
if $RC not eq 0 val
skip goterror
endif
get tmpuuxqtname
if $RC not eq 0 val
skip goterror
endif
get tmpgettyname
if $RC not eq 0 val
skip goterror
endif
get tmpsendmailname
if $RC not eq 0 val
skip goterror
endif
set tmpuucpbinpath `list $tmpuuxname lformat "%p"`
failat 1
echo "*Nrename $tmpuuciconame $tmpuuciconame.pre_$tmpversionid ..."
rename $tmpuuciconame $tmpuuciconame.pre_$tmpversionid
echo "rename $tmpuucpname $tmpuucpname.pre_$tmpversionid ..."
rename $tmpuucpname $tmpuucpname.pre_$tmpversionid
echo "rename $tmpuuxname $tmpuuxname.pre_$tmpversionid ..."
rename $tmpuuxname $tmpuuxname.pre_$tmpversionid
echo "rename $tmpuuxqtname $tmpuuxqtname.pre_$tmpversionid ..."
rename $tmpuuxqtname $tmpuuxqtname.pre_$tmpversionid
echo "rename $tmpgettyname $tmpgettyname.pre_$tmpversionid ..."
rename $tmpgettyname $tmpgettyname.pre_$tmpversionid
echo "rename $tmpsendmailname $tmpsendmailname.pre_$tmpversionid ..."
rename $tmpsendmailname $tmpsendmailname.pre_$tmpversionid
echo "rename $tmprmailname $tmprmailname.pre_$tmpversionid ..."
rename $tmprmailname $tmprmailname.pre_$tmpversionid
get tmpnikecico2name
if $RC not eq 0 val
echo "Seems as if you don't use nikecico2 yet, installing it anyway."
copy bin/nikecico2 $tmpuucpbinpath clone
else
echo "rename $tmpnikecico2name $tmpnikecico2name.pre_$tmpversionid ..."
rename $tmpnikecico2name $tmpnikecico2name.pre_$tmpversionid
echo "copy bin/nikecico2 $tmpnikecico2name clone ..."
copy bin/nikecico2 $tmpnikecico2name clone
endif
echo "copy bin/uucico $tmpuuciconame clone ..."
copy bin/uucico $tmpuuciconame clone
echo "copy bin/uucp $tmpuucpname clone ..."
copy bin/uucp $tmpuucpname clone
echo "copy bin/uux $tmpuuxname clone ..."
copy bin/uux $tmpuuxname clone
echo "copy bin/uuxqt $tmpuuxqtname clone ..."
copy bin/uuxqt $tmpuuxqtname clone
echo "copy bin/getty $tmpgettyname clone ..."
copy bin/getty $tmpgettyname clone
echo "copy bin/sendmail $tmpsendmailname clone ..."
copy bin/sendmail $tmpsendmailname clone
echo "copy bin/sendmail $tmprmailname clone ..."
copy bin/sendmail $tmprmailname clone
echo "*NInstalling auxilary files in $tmpuucpbinpath ..."
copy bin/FeatureRequest bin/BugReport bin/ctime bin/FindConfig bin/MessageID $tmpuucpbinpath clone
; Now send a mail to the author, he just LIKES to get email =;->
echo "*NSending message about installation to bugs@hactar.hanse.de ..."
set bugreportUSERNAME `findconfig USERNAME`
if "$bugreportUSERNAME" eq "*$USERNAME"
set bugreportUSERNAME root
endif
set bugreportREALNAME `findconfig REALNAME`
set bugreportHOSTNAME `findconfig NODENAME`
set bugreportEDITOR `findconfig MAILEDITOR`
set bugreportID `messageid`
set bugreportCTIME `ctime rfc`
failat 10
echo >t:report.form "To: bugs@hactar.hanse.de"
echo >>t:report.form "From: $bugreportUSERNAME@$bugreportHOSTNAME ($bugreportREALNAME)"
echo >>t:report.form "Sender: BugReport@$bugreportHOSTNAME (Script)"
echo >>t:report.form "Date: $bugreportCTIME"
echo >>t:report.form "Message-ID: <$bugreportID@$bugreportHOSTNAME>"
echo >>t:report.form "Subject: Updated UUCP system to $tmpversionid on $bugreportCTIME"
echo >>t:report.form "X-Report-For: wUUCP/-install-message-*N"
echo >>t:report.form "%id:*N$bugreportID-$bugreportUSERNAME@$bugreportHOSTNAME*N%%*N"
echo >>t:report.form "%path:*N$tmpuuciconame*N%%*N"
echo >>t:report.form "%avail:"
avail >>t:report.form
echo >>t:report.form "%%*N"
set bugreportkludge1 `cpu`
set bugreportkludge2 `version`
echo >>t:report.form "%cpu:*N$bugreportkludge1*N%%*N"
echo >>t:report.form "%ver:*N$bugreportkludge2*N%%*N"
sendmail <t:report.form
unset bugreportUSERNAME
unset bugreportREALNAME
unset bugreportHOSTNAME
unset bugreportEDITOR
unset bugreportID
unset bugreportCTIME
unset bugreportkludge1
unset bugreportkludge2
delete t:report.#? quiet
echo "*NUpdate complete. PLEASE READ THE SUPPLIED 'ChangesSince_Rel#?'-files!"
echo "And don't forget to copy the man-pages in man/ to your favourite directory."
skip cleanup
lab goterror
echo "An error occured, one or more files did not exist yet. You may need"
echo "advise from an experience user -- or a more sophisticated install"
echo "script =:->*N"
echo "NOTE: YOU MAY HAVE TO RENAME ONE OR MORE OF THE FOLLOWING FILES BACK"
echo " TO THEIR ORIGINAL NAME TO GET YOUR SYSTEM BACK INTO A WORKING"
echo " STATE!*N"
echo "$tmpuuciconame.pre_$tmpversionid"
echo "$tmpuucpname.pre_$tmpversionid"
echo "$tmpuuxname.pre_$tmpversionid"
echo "$tmpuuxqtname.pre_$tmpversionid"
echo "$tmpgettyname.pre_$tmpversionid"
echo "$tmpsendmailname.pre_$tmpversionid"
echo "$tmprmailname.pre_$tmpversionid"
echo "*NAborting ..."
lab cleanup
unset tmpversionid
unset tmpuuciconame
unset tmpuucpname
unset tmpuuxname
unset tmpuuxqtname
unset tmpgettyname
unset tmpsendmailname
unset tmprmailname
unset tmpuucpbinpath
unset tmpnikecico2name